import java.util.Arrays;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lily
 * Date: 2024-11-17
 * Time: 20:59
 */
public class test_3 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            int n = in.nextInt();

            int[] arr = new int[n];
            int[] dp = new int[n];

            int sum = 0;
            for (int i = 0; i < n; i++) {
                arr[i] = in.nextInt();
                sum += arr[i];
            }
            Arrays.sort(arr);
            dp[0] = arr[0];
            boolean flag = false;
            for (int i = 1; i < n; i++) {
                dp[i] = dp[i - 1] + arr[i];
                if (dp[i] * 2 == sum) {
                    flag = true;
                }
            }
            System.out.println(flag);
        }
    }
}
